﻿using System;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;

namespace DatabaseGroup.SSIS.SourceAdapters
{
    /// <summary>
    /// Defines information regarding a column within the source file
    /// </summary>
    [Serializable]
    public class ConfiguredFileColumn
    {
        /// <summary>
        /// Gets or sets the column name
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets if the column should be included as one of the 
        /// component output columns
        /// </summary>
        public bool IsOutput { get; set; }

        /// <summary>
        /// The column DataType
        /// </summary>
        public DataType DataType { get; set; }

        /// <summary>
        /// The maximum column length (for string types)
        /// </summary>
        public int Length { get; set; }

        /// <summary>
        /// The column scale (for decimal types)
        /// </summary>
        public int Scale { get; set; }

        /// <summary>
        /// The column precision (for decimal types)
        /// </summary>
        public int Precision { get; set; }

        /// <summary>
        /// The column codepage (for string types)
        /// </summary>
        public int CodePage { get; set; }
    }
}
